added samples
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2008 / VBWinFormBindingNestedProperties / ReadMe.txt
blobe52defaa5c01f0b8be72ee0bc19cdf8bfa256c31
1 ================================================================================
2        WINDOWS FORMS APPLICATION : VBWinFormBindToNestedProp Project Overview
3        
4                        BindToNestedProperty Sample
5                         
6 ===============================================================================
8 /////////////////////////////////////////////////////////////////////////////
9 Summary:
11 The sample demonstrates how to bind a DataGridView column to a nested property 
12 in the data source.
13    
15 /////////////////////////////////////////////////////////////////////////////
16 Code Logic:
19 1. Derive a class from the PropertyDescriptor class to create a 
20    PropertyDescriptor for a sub-property.
22 2. Derive a class from the CustomTypeDescriptor class to add extra 
23    PropertyDescriptor to the original PropertyDescriptorCollection of the 
24    type, using the derived PropertyDescriptor class.
26 3. Derive a class from the TypeDescriptionProvider class to use the derived 
27    CustomTypeDescriptor class.
29 4. Add a TypeDescriptionProviderAttribute on the type that contains complex 
30    type properties.
33 /////////////////////////////////////////////////////////////////////////////
34 References:
36 ICustomTypeDescriptor, Part 2
37 http://msdn.microsoft.com/en-us/magazine/cc163804.aspx
38    
40 /////////////////////////////////////////////////////////////////////////////